package com.test.mytest.socket;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.Holder;
import org.eclipse.jetty.servlet.ServletHandler;
import org.eclipse.jetty.servlet.ServletHolder;

import com.test.mytest.hessian.ServerServlet;

public class StartServlet {
	 public static void main(String[] args) {
			try {
				Server s=new Server(9999);
				ServletHandler handler=new ServletHandler();
				ServletHolder holder = new ServletHolder(Holder.Source.EMBEDDED);
				holder.setAsyncSupported(false);
				holder.setServlet(new ServerServlet());
				handler.addServletWithMapping(holder, "/test/*");
				s.setHandler(handler);
				s.start();
			} catch (Exception e) {
				
			}
		}
}
